cmake_minimum_required(VERSION 3.4.1)
add_definitions (-Wno-format-security)

find_library( # Sets the name of the path variable.
        log-lib

        log)

#设置so库路径
set(my_lib_path ${CMAKE_SOURCE_DIR}/../../../libs)

#将第三方库作为动态库引用
add_library(myTest
        SHARED
        IMPORTED)

#指定第三方库的绝对路径
set_target_properties(myTest
        PROPERTIES IMPORTED_LOCATION
        ${my_lib_path}/${ANDROID_ABI}/libtest-lib.so)

add_library( # Sets the name of the library.
        native-lib

        # Sets the library as a shared library.
        SHARED

        # Provides a relative path to your source file(s).
        _FileClass.cpp
        native-lib.cpp
        )

target_link_libraries( # Specifies the target library.
        native-lib
        myTest

        # Links the target library to the log library
        # included in the NDK.
        ${log-lib})